package com.ff.xyh.feign.client.userfront;

import com.ff.xyh.common.entity.result.ResultObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Auther FF
 * @Date 2022年 11月 15日
 * @Time 17:59
 */

//@FeignClient(value = "client-user-front") // 多个client指向同一个微服务会发生被注册的错误
// 指定 contextId 或 设置spring可以重复注册bean(不推荐)
@FeignClient(value = "service-user-front", contextId = "FrontBlackerClient")
@RequestMapping("/front-user")
public interface FrontBlackerClient {
    /**
     * 用户拉黑
     */
    @RequestMapping("insert-user-black")
    ResultObject insertUserBlack(
            @RequestParam(name = "id") String id,
            @RequestParam(name = "blackerId") String blackerId) ;


    @RequestMapping("get-user-black")
    ResultObject getUserBlack(
            @RequestParam(name = "userId") String userId,
            @RequestParam(name = "blackerId") String blackerId) ;

    @RequestMapping("delete-user-black")
    ResultObject deleteUserBlack(
            @RequestParam(name = "id") String id,
            @RequestParam(name = "blackerId") String blackerId);

    @RequestMapping("delete-user-black-id")
    ResultObject deleteUserBlackById(
            @RequestParam(name = "id") String id);



}
